// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import './util/rem'
import './util/reset.css'
import 'swiper/dist/css/swiper.css'
import store from './store'
import 'babel-polyfill'

import Mui from 'vue-awesome-mui';
Vue.use(Mui);
// import wx from 'weixin-js-sdk'
// Vue.use(wx);
//import 'babel-polyfill'
// import Es6Promise from 'es6-promise'
// require('es6-promise').polyfill();
// Es6Promise.polyfill();


// router.beforeEach((to, from, next) => {
//   if (!window.initUrl) {
//     window.initUrl = location.href.split('#')[0]
//   }
//   next()
// })

// 判断ios还是android
//Vue.prototype.isIosOrAndroid = function () {
//   let u = navigator.userAgent;
//   let isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1 // android终端
//   let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) // ios终端
//   let isStr = ''
//   if (isAndroid) {
//     isStr = 'android'
//   }
//   if (isiOS) {
//     isStr = 'ios'
//   }
//   return isStr
// }


// import WXConfig from './assets/js/wx.jsapi' // 微信分享
// Vue.prototype.WXConfig = WXConfig;


import { DatetimePicker ,Popup,Area,Dialog,Uploader,Icon,RadioGroup, Radio} from 'vant';

Vue.use(DatetimePicker).use(Popup).use(Area).use(Dialog).use(Uploader).use(Icon).use(RadioGroup).use(Radio);

//后台拼接
// Vue.prototype.$imgUrl = "http://www.dajiwuhui.vip/data/upload/";
//Vue.prototype.$imgUrl2 = "http://www.dajiwuhui.com/public/";


Vue.config.productionTip = false;


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
